<?php
require '../../../zb_system/function/c_system_base.php';
require '../../../zb_system/function/c_system_admin.php';
$zbp->Load();
$action='root';
if (!$zbp->CheckRights($action)) {$zbp->ShowError(6);die();}
if (!$zbp->CheckPlugin('Yun_level')) {$zbp->ShowError(48);die();}

$blogtitle='Yun_level';
require $blogpath . 'zb_system/admin/admin_header.php';
require $blogpath . 'zb_system/admin/admin_top.php';
   if(isset($_POST['Displaypldj'])){
// $zbp->Config('Yun_level')->nccolor = GetVars('nccolor', 'POST');
// $zbp->Config('Yun_level')->lvcolor = GetVars('bgcolor', 'POST');
$zbp->Config('Yun_level')->Displaypldj = $_POST['Displaypldj'];
$zbp->Config('Yun_level')->glyadmin = $_POST['glyadmin'];
$zbp->Config('Yun_level')->glych = $_POST['glych'];
$zbp->Config('Yun_level')->pldjch1 = $_POST['pldjch1'];
$zbp->Config('Yun_level')->pldjch2 = $_POST['pldjch2'];
$zbp->Config('Yun_level')->pldjch3 = $_POST['pldjch3'];
$zbp->Config('Yun_level')->pldjch4 = $_POST['pldjch4'];
$zbp->Config('Yun_level')->pldjch5 = $_POST['pldjch5'];
$zbp->Config('Yun_level')->pldjch6 = $_POST['pldjch6'];
$zbp->Config('Yun_level')->pldjch7 = $_POST['pldjch7'];
$zbp->Config('Yun_level')->pldjch8 = $_POST['pldjch8'];
$zbp->Config('Yun_level')->pldjch9 = $_POST['pldjch9'];
$zbp->SaveConfig('Yun_level');
	$zbp->ShowHint('good');
}
?>
<!-- <link href="source/colpick.css" rel="stylesheet" /> 
<script src="source/colpick.js" type="text/javascript"></script>
<style>
input.colorpicker { 
border-right-width: 25px; 
width: 84px; 
height: 25px;
line-height:25px;
cursor: pointer; 
font-family: 'Lucida Console', Monaco, monospace;
box-sizing: border-box;
padding:0;
margin:0;
float:left;
}
.color-box {
float:left;
width:30px;
height:30px;
margin:5px;
border: 1px solid white;
cursor: pointer; 
box-sizing: border-box;
}
.color-box-picker{ 	
margin: 8px 10px;
border: 1px solid #aaa; width: 86px;height: 27px;
}
</style> -->
<div id="divMain">
  <div class="divHeader"><?php echo $blogtitle;?></div>
	<div class="SubMenu">
		<a href="http://www.aaaa.com/zb_users/plugin/AppCentre/main.php?auth=1dc45015-7607-4d22-baff-0e83005c7f6f" target="_blank"><span class="m-right">其他应用</span></a>
     <a href="https://www.yunblog.net/" target="_blank"><span class="m-right">技术支持</span></a>
    </div>
  <div id="divMain2">
	<form id="form1" name="form1" method="post">	
 <?php if (function_exists('CheckIsRefererValid')) {echo '<input type="hidden" name="csrfToken" value="' . $zbp->GetCSRFToken() . '">';}?>
    <table width="100%" style='padding:0px;margin:0px;' cellspacing='0' cellpadding='0' class="tableBorder">
  <tr>
    <th width='15%'><p align="center">使用方法</p></th>
    <th width='85%' colspan="2"><p align="left">添加 <code>{if $zbp->Config('Yun_level')->Displaypldj=='1'}{Yun_level_author_class($comment.Author.Email)}{/if}</code> 到需要的位置 </p></th>
  </tr>
  </table>
 <!--  <table width="100%" style='padding:0;margin:0;' cellspacing='0' cellpadding='0' class="tableBorder">
  	<tr>
		<th width="15%"><p align="center">名称</p></th>
		<th width="60%"><p align="center">颜色</p></th>
	</tr>
	<tr>
	<td><p align="center">称号</p></td>
	<td>
		<div class="color-box-picker">
			<input type="text" id="ncpicker" class="colorpicker" name="nccolor" value="<?php echo $zbp->Config('Yun_level')->nc_color;?>" style="border-color:#<?php echo $zbp->Config('Yun_level')->nc_color;?>" />
		</div>
	</td>
	<td><p align="left">选择颜色风格</p></td>
</tr>
<tr>
	<td><p align="center">等级</p></td>
	<td>
		<div class="color-box-picker">
			<input type="text" id="bgpicker" class="colorpicker" name="bgcolor" value="<?php echo $zbp->Config('Yun_level')->lv_color;?>" style="border-color:#<?php echo $zbp->Config('Yun_level')->lv_color;?>" />
		</div>
	</td>
	<td><p align="left">选择颜色风格</p></td>
</tr>
</table> -->
	<table width="100%" style='padding:0;margin:0;' cellspacing='0' cellpadding='0' class="tableBorder">
	<tr>
		<th width="15%"><p align="center">等级</p></th>
		<th width="60%"><p align="center">开关\称号</p></th>
		<th width="25%"><p align="center">备注</p></th>
	</tr>
	<tr>
		<td><label for="pldj"><p align="center">评论等级设置</p></label></td>
		<td><p align="center">是否开启：<input type="text" id="Displaypldj" name="Displaypldj" class="checkbox" value="<?php echo $zbp->Config('Yun_level')->Displaypldj;?>" /></p></td>
		<td><p align="left">评论等级位于评论昵称后面</p></td>
	</tr>
	<tr>
		<td><label for="gly"><p align="center">管理员等级</p></label></td>
		<td><p align="left">管理员邮箱：<br/><textarea name="glyadmin" type="text" id="glyadmin" style="width:98%;"><?php echo $zbp->Config('Yun_level')->glyadmin;?></textarea><br/>管理员称号：<br/><textarea name="glych" type="text" id="glych" style="width:98%;"><?php echo $zbp->Config('Yun_level')->glych;?></textarea></p></td>
		<td><p align="left">比如：站长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch1"><p align="center">评论者等级1<br/>（评论数<10）</p></label></td>
		<td><p align="left">等级1称号：<br/><textarea name="pldjch1" type="text" id="pldjch1" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch1;?></textarea><br/></p></td>
		<td><p align="left">比如：农民</p></td>
	</tr>
		<tr>
		<td><label for="pldjch2"><p align="center">评论者等级2<br/>（评论数>=10）</p></label></td>
		<td><p align="left">等级2称号：<br/><textarea name="pldjch2" type="text" id="pldjch2" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch2;?></textarea><br/></p></td>
		<td><p align="left">比如：队长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch3"><p align="center">评论者等级3<br/>（评论数>=20）</p></label></td>
		<td><p align="left">等级3称号：<br/><textarea name="pldjch3" type="text" id="pldjch3" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch3;?></textarea><br/></p></td>
		<td><p align="left">比如：村长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch4"><p align="center">评论者等级4<br/>（评论数>=40）</p></label></td>
		<td><p align="left">等级4称号：<br/><textarea name="pldjch4" type="text" id="pldjch4" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch4;?></textarea><br/></p></td>
		<td><p align="left">比如：乡长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch5"><p align="center">评论者等级5<br/>（评论数>=80）</p></label></td>
		<td><p align="left">等级5称号：<br/><textarea name="pldjch5" type="text" id="pldjch5" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch5;?></textarea><br/></p></td>
		<td><p align="left">比如：县长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch6"><p align="center">评论者等级6<br/>（评论数>=160）</p></label></td>
		<td><p align="left">等级6称号：<br/><textarea name="pldjch6" type="text" id="pldjch6" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch6;?></textarea><br/></p></td>
		<td><p align="left">比如：市长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch7"><p align="center">评论者等级7<br/>（评论数>=320）</p></label></td>
		<td><p align="left">等级7称号：<br/><textarea name="pldjch7" type="text" id="pldjch7" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch7;?></textarea><br/></p></td>
		<td><p align="left">比如：省长</p></td>
	</tr>
		<tr>
		<td><label for="pldjch8"><p align="center">评论者等级8<br/>（评论数>=640）</p></label></td>
		<td><p align="left">等级8称号：<br/><textarea name="pldjch8" type="text" id="pldjch8" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch8;?></textarea><br/></p></td>
		<td><p align="left">比如：总理</p></td>
	</tr>
		<tr>
		<td><label for="pldjch9"><p align="center">评论者等级9<br/>（评论数>=1280）</p></label></td>
		<td><p align="left">等级9称号：<br/><textarea name="pldjch9" type="text" id="pldjch9" style="width:98%;"><?php echo $zbp->Config('Yun_level')->pldjch9;?></textarea><br/></p></td>
		<td><p align="left">比如：主席</p></td>
	</tr>	
</table>
	<br />
	<input name="" type="Submit" class="button" value="保存"/>
	</form>
  </div>
</div>
<!-- 
<script type="text/javascript">
	$('#bgpicker').colpick({
	layout:'hex',
	submit:0,
	onChange:function(hsb,hex,rgb,el,bySetColor) {
		$(el).css('border-color','#'+hex);
		if(!bySetColor) $(el).val(hex);
	}
}).keyup(function(){
	$(this).colpickSetColor(this.value);
});

$('.color-box').click(function() {
	    var c = $(this).data('color');
		$('#bgpicker').colpickSetColor(c);
		$('#bgpicker').val(c );
		$('#bgpicker').css('border-color', '#'+c); 
});
$('#ncpicker').colpick({
	layout:'hex',
	submit:0,
	onChange:function(hsb,hex,rgb,el,bySetColor) {
		$(el).css('border-color','#'+hex);
		if(!bySetColor) $(el).val(hex);
	}
}).keyup(function(){
	$(this).colpickSetColor(this.value);
});

$('.color-box').click(function() {
	    var c = $(this).data('color');
		$('#ncpicker').colpickSetColor(c);
		$('#ncpicker').val(c );
		$('#ncpicker').css('border-color', '#'+c); 
});
</script> -->
<?php
require $blogpath . 'zb_system/admin/admin_footer.php';
RunTime();
?>